//调用后端接口
import request from '@/utils/request'

export function getStudents() {
    return request({
        url: '/demo/getStudents',
        method: 'get'
    })
}
//查询
export function findStudents(params){
    return request({
        method:'post',
        url:'/demo/findStudent',
        data:params
    })
}

export function deleteStudent(data) {
    return request({
        url: '/demo/deleteStudent',
        method: 'post',
        data
    })
}

//批量删除
export function deleteStudentsByIds(stuids) {
    return request({
        url: "/demo/deleteStudentsByIds",
        method: 'post',
        data: stuids
    });
}

export function addStudent(data) {
    return request({
        url: '/demo/addStudents',
        method: 'post',
        data
    })
}

export function updateStudent(data) {
    return request({
        url: '/demo/updateStudent',
        method: 'post',
        data
    })
}